package com.immunology.web.formatter;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.log4j.Logger;

public class DateFormatter {

    private static final Logger LOG = Logger.getLogger(DateFormatter.class);

    public static Date createDate(String date) {
	Date result = null;
	SimpleDateFormat format = new SimpleDateFormat("dd/mm/yyyy");
	try {
	    result = format.parse(date);
	} catch (ParseException e) {
	    LOG.error("Wrong date format! " + e.getMessage());
	}
	return result;
    }

}
